package org.example.controller;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.example.service.ElderlyService;
import org.example.service.VolunteersService;
import org.example.utils.ElderlyUpdateRequest;
import org.example.utils.R;
import org.example.utils.VolunteersUpdateRequest;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: volunteers
 * Description:
 *
 * @Author Kotaro
 * @Create 2024/12/9 11:00
 * @Version 1.0
 */
@CrossOrigin //允许其他源访问我们的controller
@RestController
@RequestMapping("volunteer")
@Slf4j
public class VolunteersController {

    @Resource
    private VolunteersService volunteersService;

    @PutMapping("update")
    public R updateVolunteersByVolunteersId(@RequestBody VolunteersUpdateRequest volunteersUpdateRequest){
        R r = volunteersService.updateVolunteersByVolunteersId(volunteersUpdateRequest);
        return r;
    }
}
